/**
 * ExampleSubRevSourceBO.java
 * Created on March 22, 2007, 8:19 AM
 *
 *
 */

package edu.byu.isys413.jjenkins.data;

/**
 * This is an example of a sub revenue source. A real sub revenue source BO
 * could be much more complicated. For example, here the quantity and description
 * and just hard coded in and set. In reality, this might not contain the
 * description but it might be contained in a different object and this method
 * would go find it.
 *
 * @author      Jeff Jenkins
 * @version     1.0
 */
public class ExampleSubRevSourceBO extends RevenueSourceBO{
    
    
    /** Creates a new instance of ExampleSubRevSourceBO */
    public ExampleSubRevSourceBO() {
    }

   
    
    
     /**
     * The method used to derive the quantity may vary from revenue source
     * to revenue source. Therefore any class that extends this class must
     * implement this method. (For example: the quantity in backup is the size
     * (in GB), the quantity in PrintOrder is the number of prints. Note: some
     * revenue sources may only have a quantity of 1) NOTE: once you calculate 
     * the quantity you must set teh quantity variable in teh RevenueSource Class.
     * 
     * 
     * @return Double quantity
     */
    public double calcQuantity(){
        
        // you should caluclate the quantity here
        super.setQuantity(1);
        return (super.getQuantity());
    }

    /**
     * The method used to derive the description may vary from revenue source
     * to revenue source. Therefore any class that extends this class must
     * implement this method. (For example: Sale revenue source would access the
     * conceptual product to get the description while backup revenue source
     * already contains the description. NOTE: once you calculate the description you
     * must set teh quantity variable in teh RevenueSource Class.
     * 
     * 
     * @return String description
     */
    public String createDescription(){
        // You should create the descrption here a
        super.setDescription("This is an example descrption");
        return(super.getDescription());
    }

    /**
     *  The price must be set in the revenueSource object. This is done so if the
     * price of a Product or conceptual rental changes, the price on the
     * transaction will not change.In this method you must caluculate the price 
     * for the revenue source and set teh price attibute in the revenueSourceBO
     * 
     * 
     * @return double price.
     */
    public double calcPrice(){
        //you should calculate the price here
        super.setPrice(0);
        return(super.getPrice());
    }
}




